package com.synergy.stockflow.procure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.synergy.stockflow.warehouse.entity.Warehouse;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "acceptance_on_arrival")
public class AcceptanceOnArrival {
    /**
     * 到货验收编码
     */
    @TableId(value = "acceptance_on_arrival_id", type = IdType.ASSIGN_ID)
    @Schema(description="到货验收编码")
    private String acceptanceOnArrivalId;

    /**
     * 采购订单编码
     */
    @TableField(value = "acceptance_on_arrival_purchase_order_id")
    @Schema(description="采购订单编码")
    private String acceptanceOnArrivalPurchaseOrderId;

    /**
     * 仓库编码
     */
    @TableField(value = "acceptance_on_arrival_warehouse_id")
    @Schema(description="仓库编码")
    private String acceptanceOnArrivalWarehouseId;

    /**
     * 入库批次编码
     */
    @TableField(value = "acceptance_on_arrival_inbound_batches")
    @Schema(description="入库批次编码")
    private String acceptanceOnArrivalInboundBatches;

    /**
     * 入库总数量
     */
    @TableField(value = "acceptance_on_arrival_total_quantity")
    @Schema(description="入库总数量")
    private BigDecimal acceptanceOnArrivalTotalQuantity;

    /**
     * 入库总金额
     */
    @TableField(value = "acceptance_on_arrival_inbound_amount")
    @Schema(description="入库总金额")
    private BigDecimal acceptanceOnArrivalInboundAmount;

    /**
     * 是否有不合格产品
     */
    @TableField(value = "acceptance_on_arrival_eligibility")
    @Schema(description="是否有不合格产品")
    private String acceptanceOnArrivalEligibility;

    /**
     * 质检时间
     */
    @TableField(value = "acceptance_on_arrival_quality_inspection_time")
    @Schema(description="质检时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date acceptanceOnArrivalQualityInspectionTime;

    /**
     * 员工编码
     */
    @TableField(value = "acceptance_on_arrival_employee_id")
    @Schema(description="员工编码")
    private String acceptanceOnArrivalEmployeeId;

    /**
     * 合格品是否入库
     */
    @TableField(value = "acceptance_on_arrival_storage")
    @Schema(description="合格品是否入库")
    private String acceptanceOnArrivalStorage;

    /**
     * 入库时间
     */
    @TableField(value = "acceptance_on_arrival_inbound_time")
    @Schema(description="入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date acceptanceOnArrivalInboundTime;

    /**
     * 入库员
     */
    @TableField(value = "acceptance_on_arrival_warehousing_clerk")
    @Schema(description="入库员")
    private String acceptanceOnArrivalWarehousingClerk;

    /**
     * 入库员
     */
    @TableField(exist = false)
    @Schema(description="采购详情")
    private String inboundDetailsPurchaseDetailsId;

    @TableField(exist = false)
    @Schema(description="员工姓名")
    private String nickname;

    @TableField(exist = false)
    @Schema(description="员工姓名")
    private String nickname1;

    @TableField(exist = false)
    @Schema(description="退货总量")
    private BigDecimal zong;

    @TableField(exist = false)
    @Schema(description="供应商价格")
    private SupplierPrices supplierPrice;

    /**
     * 仓库
     */
    @TableField(exist = false)
    @Schema(description="仓库")
    private Warehouse warehouse;
    /**
     * 采购订单详情
     */
    @TableField(exist = false)
    @Schema(description="验收详情")
    private List<InboundDetails> inboundDetailsList;
}